package com.基本数据类型和引用数据类型区别01;

public class StringTest01 {

    public static void change(String a,String b){
        a +="AA";
        b +="BB";
    }

    public static void main(String[] args) {
//        String a =new String("A");
//        String b =new String("B");
//        change(a,b);
//        System.out.println(a);//A
//        System.out.println(b);//B

        int a = 100;
        String b = "B";
        StringBuilder c = new StringBuilder("C");
        StringBuffer d = new StringBuffer("D");
        change2(a,b,c,d);
        //a:100 b:B    c:CCCC   d DDDD
        System.out.println(a);System.out.println(b);System.out.println(c);System.out.println(d);
    }



    public static void change2(int a,String b,StringBuilder c,StringBuffer d){
        a +=100;
        b +="bbb";
        c.append("CCC");
        d.append("DDD");
        c=new StringBuilder("FFFF");
        c.append("GGG");
    }







}
